import request from '@/utils/request'

//字典
export function getDictionary(dictionaryTypeId) {
  return request({
    url: `/system/DictionaryData/${dictionaryTypeId}/Data/Selector`,
    method: 'get'
  })
}

//添加子女信息
export function addChildren(data) {
  return request({
    url: '/spgl/SpdbStudent',
    method: 'post',
    data
  })
}

//获取学校列表
export function getSchool(data) {
  return request({
    url: '/spgl/SpdbSchool/getSchoolList',
    method: 'post',
    data
  })
}

//所有的子女信息列表
export function getChildrenInfo(data) {
  return request({
    url: '/spgl/SpdbParent/getParentStudentRelList',
    method: 'post',
    data
  })
}

//单个子女信息详情
export function studentInfo(id) {
  return request({
    url: `/spgl/SpdbStudent/${id}`,
    method: 'get'
  })
}

//编辑子女信息
export function editChildren(data) {
  return request({
    url: '/spgl/SpdbStudent',
    method: 'put',
    data
  })
}

//订单列表
export function getOrder(data) {
  return request({
    url: '/spgl/SpdbScglGiftOrderInfo/getList',
    method: 'post',
    data
  })
}

//订单详情
export function orderInfo(id) {
  return request({
    url: `/spgl/SpdbScglGiftOrderInfo/${id}`,
    method: 'get'
  })
}

//获取全局配置
export function getConfig(data) {
  return request({
    url: '/spgl/SpdbConfig/getList',
    method: 'post',
    data
  })
}